<HTML><HEAD><TITLE>fun_to_cons_var(+CostFun, -ConsList, -CostVar)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_probing_for_scheduling)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>fun_to_cons_var(+CostFun, -ConsList, -CostVar)</H1>
Convert a cost expression to a variable and a list of constraints, 
suitable to pass into probe_cstr_sched/7
<DL>
<DT><EM>CostFun</EM></DT>
<DD>a cost function of the form accepted by probe_sched/5
</DD>
<DT><EM>ConsList</EM></DT>
<DD> a variable which will be instantiated to a list of constraints, 
suitable to pass into probe_cstr_sched/7
</DD>
<DT><EM>CostVar</EM></DT>
<DD>a variable constrained to take a value greater than or equal to 
the cost function
</DD>
</DL>
<H2>Description</H2>
<P>
If the user needs to use probe_cstr_sched instead of probe_sched, this predicate can be used to convert the cost function to a list of constraints and a cost variable suitable for passing to probe_cstr_sched

<H3>Resatisfiable</H3>
no
<H2>Examples</H2>
<PRE>
fun_to_cons_var(abs(X-10)+abs(Y-3),ConsList,Var)
</PRE>
<H2>See Also</H2>
<A HREF="../../lib/ic_probing_for_scheduling/probe_sched-5.html">probe_sched / 5</A>, <A HREF="../../lib/ic_probing_for_scheduling/probe_cstr_sched-7.html">probe_cstr_sched / 7</A>
</BODY></HTML>
